package com.zjw.xm.xmindex.web.feign;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zjw.xm.entity.CrBook;
import com.zjw.xm.entity.CrCategory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient("xm-order")
public interface IOrderAction {

    @RequestMapping("xm/crBook/queryNew")
    List<CrBook> queryNew();

    @RequestMapping("xm/crBook/findById")
    Map<String,Object> findById(@RequestParam int id);

    @RequestMapping("xm/crCategory/queryCategory")
    List<CrCategory> queryCategory();





    @RequestMapping("xm/crBook/queryPageByPaking")
    Page<CrBook> queryPageByPaking(
            @RequestParam String paking,
            @RequestParam int page,
            @RequestParam int size
    );


    @RequestMapping("xm/crBook/queryPageByDxwx")
    Page<CrBook> queryPageByDxwx(
            @RequestParam int category2,
            @RequestParam int page,
            @RequestParam int size
    );


    @GetMapping("xm/crBook/queryPageByFznj")
    Page<CrBook> queryPageByFznj(
            @RequestParam int page,
            @RequestParam int size
    );

    @RequestMapping("xm/crCategory/selectCategory")
    List<CrCategory> selectCategory();

    @RequestMapping("xm/crBook/queryBookPage")
    Page<Map<String,Object>> queryBookPage(@RequestParam int id,
                                           @RequestParam int page,
                                           @RequestParam int size);

}
